{
  "name"    : "Inspector (export) config",

  "let" :
  {
    "APPLICATION"  : "inspector",
    "QOOXDOO_PATH" : "../..",
    "CACHE"        : "${TMPDIR}/qx${QOOXDOO_VERSION}/cache",
    "THEME"        : "inspector.theme.Theme",
    "ICONTHEME"    : ["Tango"],    
    "INSPECTOR_ROOT"  : ".",
    "INSPECTOR_PATH"   : "${ROOT}/build",    
    "OPTIMIZE"     : ["basecalls", "variables", "privates", "strings", "whitespace"]
  },

  "jobs" :
  {
    "libraries" :
    {
      "desc" : "includer job, to hold the essential libraries for the compile jobs",

      "library" :
      [
        {
          "manifest" : "${QOOXDOO_PATH}/framework/Manifest.json"
        },

        {
          "manifest" : "${INSPECTOR_ROOT}/Manifest.json"
        }
      ]
    },

    "common" :
    {
      "desc"    : "common settings for base.json jobs",

      "extend"  : ["libraries"],

      "include" :
      [
        "${THEME}",
        "inspector.Application"
      ],

      "cache" :
      {
        "compile"   :  "${CACHE}",
        "downloads" :  "${CACHE}/downloads",
        "invalidate-on-tool-change" : true
      },

      "environment" :
      {
        "qx.version"     : "${QOOXDOO_VERSION}",
        "qx.revision"    : "${QOOXDOO_REVISION}",
        "qx.theme"       : "${THEME}",
        "qx.application" : "inspector.Application",
        "inspector.selenium.core" : "http://selenium.googlecode.com/svn/tags/selenium-core/REL-1.0.1/src/main/resources/"
      },
      
      "asset-let" :
      {
        "qx.icontheme" : "${ICONTHEME}"
      }
    },

    
    // -- build jobs ---------------------------------------------------

    "build-script" :
    {
      "desc"    : "create build script of current application",

      "extend" : ["common"],

      "environment" :
      {
        "qx.debug" : false
      },

      "compile-options" :
      {
        "paths"  :
        {
          "file" : "${INSPECTOR_PATH}/script/inspector.js",
          "app-root" : "${INSPECTOR_PATH}"
        },
        "uris"   :
        {
          "script"   : "./script"
          ,"resource" : "./resource"
        },
        "code"   :
        {
          "format"   : true,
          "locales"  : "${LOCALES}",
          "optimize" : "${OPTIMIZE}",
          "except"   : []
        }
      },
      
      "compile" : { "type" : "build" }
    },


    "build-files" :
    {
      "desc"    : "copy files of current application to build dir",

      "extend" : ["common"],

      "copy-files" :
      {
        "files" :
        [
          "index.html"
        ],

        "target" : "${INSPECTOR_PATH}",
        "source" : "${INSPECTOR_ROOT}/source"
      }
    },
    
    
    "build-files-simulator" :
    {
      "desc"    : "copy the user extensions file from the simulator component to build dir",

      "extend" : ["common"],

      "copy-files" :
      {
        "files" :
        [
          "user-extensions.js"
        ],

        "target" : "${INSPECTOR_PATH}/script",
        "source" : "${QOOXDOO_PATH}/component/simulator/tool/user-extensions"
      }
    },


    "build-resources":
    {
      "desc"    : "copy necessary resources for current application to build dir",

      "extend" : ["common"],

      "copy-resources" :
      {
        "target"          : "${INSPECTOR_PATH}",
        "resource-filter" : true
      }
    },


    "build" :
    {
      "desc"    : "create build version of current application",

      "run" :
      [
        "build-resources",
        "build-script",
        "build-files",
        "build-files-simulator"
      ],
      
      "environment" :
      {
        "inspector.selenium.extensions" : "script/user-extensions.js"
      }
    }
  }
}
